package com.ruoyi.fuw.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 消息记录对象 fuw_message
 * 
 * @author ruoyi
 * @date 2021-11-14
 */
public class FuwMessage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long uId;

    /** 消息发起人 */
    @Excel(name = "消息发起人")
    private String from;

    /** 消息接收人 */
    @Excel(name = "消息接收人")
    private String to;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String chatText;

    /** 消息发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "消息发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date chatTime;

    /** 消息读取时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "消息读取时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date chatEndTime;

    /** 消息状态（0：消息发送；1：消息接收；2：消息已读） */
    @Excel(name = "消息状态", readConverterExp = "0=：消息发送；1：消息接收；2：消息已读")
    private String chatType;

    public void setuId(Long uId) 
    {
        this.uId = uId;
    }

    public Long getuId() 
    {
        return uId;
    }
    public void setFrom(String from) 
    {
        this.from = from;
    }

    public String getFrom() 
    {
        return from;
    }
    public void setTo(String to) 
    {
        this.to = to;
    }

    public String getTo() 
    {
        return to;
    }
    public void setChatText(String chatText) 
    {
        this.chatText = chatText;
    }

    public String getChatText() 
    {
        return chatText;
    }
    public void setChatTime(Date chatTime) 
    {
        this.chatTime = chatTime;
    }

    public Date getChatTime() 
    {
        return chatTime;
    }
    public void setChatEndTime(Date chatEndTime) 
    {
        this.chatEndTime = chatEndTime;
    }

    public Date getChatEndTime() 
    {
        return chatEndTime;
    }
    public void setChatType(String chatType) 
    {
        this.chatType = chatType;
    }

    public String getChatType() 
    {
        return chatType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("uId", getuId())
            .append("from", getFrom())
            .append("to", getTo())
            .append("chatText", getChatText())
            .append("chatTime", getChatTime())
            .append("chatEndTime", getChatEndTime())
            .append("chatType", getChatType())
            .toString();
    }
}
